package com.neusoft.elmboot.mapper;

import java.math.BigDecimal;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.neusoft.elmboot.po.Point;

@Mapper
public interface PointMapper {
    
    @Insert("insert into point values(#{userId}, 10)")
    public int savePoint(String userId);

    @Update("update point set count = #{count} where userId = #{userId}")
    public int updatePointCount(String userId, BigDecimal count);

    @Select("select * from point where userId= #{userId}")
    public Point getPointByUserid(String userId);
}
